//
// Created by Administrator on 2021/4/7.
//

#ifndef UNTITLED2_RABBITMQ_API_H
#define UNTITLED2_RABBITMQ_API_H

#define EXCHANGENAME "slave-health-topic"
#define CPUQUEUE     "slave-health-cpu"
#define DISKQUEUE     "slave-health-disk"
#define MEMQUEUE     "slave-health-mem"
#define PROCQUEUE     "slave-health-proc"
#define SYSQUEUE     "slave-health-sys"
#define USERQUEUE     "slave-health-user"

amqp_connection_state_t connectServer(char *ip, int port);
// amqp_connection_state_t getPublishConn(char *ip, int port, char *queueName);
amqp_connection_state_t getRecvConn(char *ip, int port, char **queueName);
int publishMessage(amqp_connection_state_t conn, int channel, int type, char *hostName, char *ip, char *message);
int recvMessage(amqp_connection_state_t conn, int channel, char *queueName, char *message, int length, char *hostname, char *ip);

#endif //UNTITLED2_RABBITMQ_API_H
